//
//  NSMutableDictionary+Util.m
//  wozhua
//
//  Created by 王洋 on 15/5/1.
//  Copyright (c) 2015年 王洋. All rights reserved.
//

#import "NSMutableDictionary+Util.h"

@implementation NSMutableDictionary (Util)

// main
+ (void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        [[[NSMutableDictionary dictionary] class] swizzleMethod:@selector(setObject:forKey:) toMethod:@selector(customSetObject:forKey:)];
    });
}

- (void)customSetObject:(id)anObject forKey:(id<NSCopying>)aKey {
    if (anObject == nil) {
        return;
    } else {
        [self customSetObject:anObject forKey:aKey];
    }
}

@end
